package wzvtc.dbad.attend.repo;


import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import wzvtc.dbad.attend.entity.Student;

import java.util.List;
import java.util.stream.Stream;

@Repository
public interface StudentRepository extends PagingAndSortingRepository<Student, Integer> {
    List<Student> findByClazzId(long clazzId);


    //   List<Student> findByFirstname(String firstname);

//    List<Student> findByFirstnameOrderByLastname(String firstname, Pageable pageable);
//
//    Slice<Student> findByLastname(String lastname, Pageable pageable);
//
//    Page<Student> findByLastname(String lastname, Pageable pageable);

  //  Student findByFirstnameAndLastname(String firstname, String lastname);

  //  Student findFirstByLastname(String lastname);

//    @Query("SELECT * FROM Student WHERE lastname = :lastname")
//    List<Student> findByLastname(String lastname);
//    @Query("SELECT * FROM Student WHERE lastname = :lastname")
 //   Stream<Student> streamByLastname(String lastname);
    
}
